package com.nulldev.util.internal.unsafecompat;

import com.nulldev.util.internal.unsafecompat.impl.legacy.LegacyUnsafe;

/**
 * Compatibility layer for Unsafe to allow
 * <ul>
 * <li>Continued support if https://openjdk.org/jeps/8323072 gets accepted</li>
 * <li>A JRE 21+ implementation that uses more modern features</li>
 * <ul>
 * <br>
 * <br>
 * Currently only the legacy path (using Unsafe) is implemented.
 */
public class UnsafeCompat {

	private static final IUnsafe CACHE;

	static {
		CACHE = new LegacyUnsafe();
	}

	public static IUnsafe get() {
		return CACHE;
	}
}
